import request from '@/utils/request'

// 查询盘点单明细列表
export function listDetail(query) {
  return request({
    url: '/check/detail/list',
    method: 'get',
    params: query
  })
}

// 查询盘点单明细详细
export function getDetail(inventoryCheckDetailId) {
  return request({
    url: '/check/detail/' + inventoryCheckDetailId,
    method: 'get'
  })
}
// 查询盘点单明细详细
export function getDetailBySelf() {
  return request({
    url: '/check/detail/checkDetailBySelf',
    method: 'get'
  })
}
// 查询盘点单明细详细
export function checkAssetList(query) {
  return request({
    url: '/check/detail/checkAssetList',
    method: 'get',
    params: query
  })
}



// 查询盘点单明细详细
export function checkMaterial(checkId) {
  return request({
    url: '/check/detail/checkMaterial/' + checkId,
    method: 'get'
  })
}
// 新增盘点单明细
export function addDetail(data) {
  return request({
    url: '/check/detail',
    method: 'post',
    data: data
  })
}

// 修改盘点单明细
export function updateDetail(data) {
  return request({
    url: '/check/detail',
    method: 'put',
    data: data
  })
}

// 删除盘点单明细
export function delDetail(inventoryCheckDetailId) {
  return request({
    url: '/check/detail/' + inventoryCheckDetailId,
    method: 'delete'
  })
}
